Repository navigation
Test that tag keys are held to the same limits as names and values - #35
Conversation
The README promises names and tag keys/values are cut to 255 bytes, invalid UTF-8 becomes U+FFFD, blank keys are dropped and at most 32 tags are sent. Only names and values had a test for the cut, and nothing showed that a dropped blank key leaves its slot under the cap to a real tag. Also check that a negative infinite value is left out, as NaN and +inf already are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-review rubric (head 77330e9):
Judgment note: Out-of-diff observation: This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
Summary
Stage B unit-test expansion: the "Fits the server's limits" row of the README's
reportpromise table is now covered field by field. Production code is not changed.tagKeysAreCutAndCleanedLikeNamesAndValues(new): a tag key is cut to 255 bytes and is never cut in the middle of a character, and invalid UTF-8 in a key or a value becomes U+FFFD. Before this PR, only names and values were tested for the 255-byte cut, and only names were tested for U+FFFD.blankTagKeysDoNotCountTowardTheTagCap(new): blank keys ("","\t"," ") sort before the real keys but are dropped without using up the 32-tag cap, so all 32 real tags are still sent.jsonIsEscapedAndCleaned: adds one assertion that a negative infinitevalueis left out, alongside the existing NaN and+infassertions.No tracking issue. The gap was found during triage.
Skipped issues
TRACE_CLIENT_CURLignored on Windows) and The version tag is dropped when an event's own tags fill the 32-tag cap #21 (versiontag dropped at the 32-tag cap) were deferred. Both need an owner decision that has not been recorded yet (see the existing comments on each issue), and TRACE_CLIENT_CURL override is ignored on Windows when System32\curl.exe exists #1 also touches thecurl.exelookup, which is on the do-not-auto-merge list.A documentation sweep was also run against
trace_client.hpp,Makefile,CMakeLists.txtand.github/workflows/build.yml. It found no drift beyond what #1 and #21 already track (for #21, the README saystags"always holds at leastversion").Test plan
make test(g++, C++11,-Werror):79 tests, 0 failed checks(up from 77, because two tests were added and both are registered intests[])jsonIsEscapedAndCleaned(79 tests, 5 failed checks). After the header was restored, the suite is green again.Buildgreen on all jobsThis PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson